<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<link rel="STYLESHEET" type="text/css" href="${base}/res/admin/css/tab.css"/>
	<script type="text/javascript" src="${base}/res/comm/js/jquery/jquery.js"></script>
	<script type="text/javascript" src="${base}/res/admin/js/admin.js"></script>
	<script language="javascript" type="text/javascript" src="${base}/res/comm/js/date/WdatePicker.js"></script>
	<script lang="javascript">
		function save(){
			ajaxPost('${base}/admin/ticket/save.jhtml',{
				'num':$('#num').val(),
				'snlength':$('#snlength').val(),
				'sntype':$('input:radio[name="sntype"]:checked').val(),
				'pwdlength':$('#pwdlength').val(),
				'pwdtype':$('input:radio[name="pwdtype"]:checked').val(),
				'beat':$('#beat').val(),
				'pointb':$('#pointb').val(),
				'starttime':$('#starttime').val(),
				'endtime':$('#endtime').val()
				},null,'json',savecallback);
		}
		function savecallback(data){
			window.alert(data.message);
			if(data.status=='success'){
				window.location.href='${base}/admin/ticket/index.jhtml';	
			}
		}
	</script>
  </head>
  
<body style="overflow:auto;">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
	  <tr>
	    <td height="30">
	    <table width="100%" border="0" cellspacing="0" cellpadding="0">
	      <tr>
	        <td width="15" height="30"><img src="${base}/res/admin/images/tab_03.gif" width="15" height="30" /></td>
	        <td background="${base}/res/admin/images/tab_05.gif"><img src="${base}/res/admin/images/311.gif" width="16" height="16" /> <span class="STYLE4" style="16">添加点券</span></td>
	        <td width="14"><img src="${base}/res/admin/images/tab_07.gif" width="14" height="30" /></td>
	      </tr>
	    </table>
	    </td>
	  </tr>
	  <tr>
	    <td>
	    <table width="100%" border="0" cellspacing="0" cellpadding="0">
	      <tr>
	        <td width="9" background="${base}/res/admin/images/tab_12.gif">&nbsp;</td>
	        <td bgcolor="#e5f1d6">
	        <table width="100%">
	    		<tr>
	    			<td widith="50%">
	        <input type="hidden" id="id" name="id" value="${(member.id)!"0"}">
	        <table width="99%" border="0" align="center" cellpadding="4" cellspacing="0" bgcolor="#CECECE">
    		<tr>
		   		<td height="18" bgcolor="#FFFFFF"><span class="STYLE1">数量:</span></td>
		   		<td height="18" bgcolor="#FFFFFF"><input id="num" name="num" value="" style="width:300px;"/>(建议最大一次生成1000个)</td>
		  		<td bgcolor="#FFFFFF">&nbsp;</td>
		  	</tr>
		  	<tr>
		   		<td height="18" bgcolor="#FFFFFF"><span class="STYLE1">卡号长度:</span></td>
		   		<td height="18" bgcolor="#FFFFFF"><input id="snlength" name="snlength" value="" style="width:300px;"/>（最小6位）</td>
		  		<td bgcolor="#FFFFFF">&nbsp;</td>
		  	</tr>
		  	<tr>
		   		<td height="18" bgcolor="#FFFFFF"><span class="STYLE1">卡号类型:</span></td>
		   		<td height="18" bgcolor="#FFFFFF">
		   			<input type="radio" name="sntype" value="1">字母
      				<input type="radio" name="sntype" value="2" checked="checked">数字
      				<input type="radio" name="sntype" value="3">混合
		   		</td>
		  		<td bgcolor="#FFFFFF">&nbsp;</td>
		  	</tr>
		  	<tr>
		   		<td height="18" bgcolor="#FFFFFF"><span class="STYLE1">密码长度:</span></td>
		   		<td height="18" bgcolor="#FFFFFF"><input id="pwdlength" name="pwdlength" value="" style="width:300px;"/></td>
		  		<td bgcolor="#FFFFFF">&nbsp;</td>
		  	</tr>
		  	<tr>
		   		<td height="18" bgcolor="#FFFFFF"><span class="STYLE1">密码类型:</span></td>
		   		<td height="18" bgcolor="#FFFFFF">
		   			<input type="radio" name="pwdtype" value="1">字母
      				<input type="radio" name="pwdtype" value="2" checked="checked">数字
      				<input type="radio" name="pwdtype" value="3">混合
		   		</td>
		  		<td bgcolor="#FFFFFF">&nbsp;</td>
		  	</tr>
		  	<tr>
		   		<td height="18" bgcolor="#FFFFFF"><span class="STYLE1">闪点:</span></td>
		   		<td height="18" bgcolor="#FFFFFF"><input id="beat" name="beat" value="" style="width:300px;"/></td>
		  		<td bgcolor="#FFFFFF">&nbsp;</td>
		  	</tr>
		  	<tr>
		   		<td height="18" bgcolor="#FFFFFF"><span class="STYLE1">拍点:</span></td>
		   		<td height="18" bgcolor="#FFFFFF"><input id="pointb" name="pointb" value="" style="width:300px;"/></td>
		  		<td bgcolor="#FFFFFF">&nbsp;</td>
		  	</tr>
		  	<tr>
		   		<td height="18" bgcolor="#FFFFFF"><span class="STYLE1">有效期:</span></td>
		   		<td height="18" bgcolor="#FFFFFF">
		   			<input class="Wdate" type="text" id="starttime" name="starttime" value="" onFocus="WdatePicker({isShowClear:true,skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true})" style="width:140px;"/>
		   			至<input class="Wdate" type="text" id="endtime"  name="endtime" value="" onFocus="WdatePicker({isShowClear:true,skin:'whyGreen',dateFmt:'yyyy-MM-dd HH:mm:ss',readOnly:true,minDate:'#F{$dp.$D(\'starttime\')}'})" style="width:140px;"/>
		   		</td>
		  		<td bgcolor="#FFFFFF">&nbsp;</td>
		  	</tr>
		  	<tr>
		   		<td height="18" bgcolor="#FFFFFF" colspan=2 align="center">
		   			<input type="button" value="保存"  onclick="save()"/>&nbsp;&nbsp;
		   			<input type="button" value="返回" onclick="window.history.back(-1)">
		   		</td>
		   		<td bgcolor="#FFFFFF">&nbsp;</td>
		   	</tr>
		 	</table>
		 	</form>
		 	<td widith="50%" valign="top">
	    			<div align="right" width="95%">
				</div>
				<div id="gridTreeDiv">
				</div>
	    			</td>
	    		</tr>
	    	</table>
        </td>
        <td width="9" background="${base}/res/admin/images/tab_16.gif">	
        </td>
      </tr>
    </table>
	</td>
  	</tr>
  	<tr>
    	<td height="29">
    	<table width="100%" border="0" cellspacing="0" cellpadding="0">
      	<tr>
        <td width="15" height="29"><img src="${base}/res/admin/images/tab_20.gif" width="15" height="29" /></td>
        <td background="${base}/res/admin/images/tab_21.gif">&nbsp;</td>
        <td width="14"><img src="${base}/res/admin/images/tab_22.gif" width="14" height="29" /></td>
      	</tr>
    	</table></td>
  	</tr>
</table>
</body>
</html>
